<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:54:"E:\WWW\waimai/app/admin/shop\view\shop_store\edit.html";i:1503106217;s:52:"E:\WWW\waimai/app/admin/shop\view\template\base.html";i:1495522842;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="__STATIC__/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <!--图标字体元件库-->
    <link rel="stylesheet" href="__STATIC__/plugins/font-awesome4.5.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/AdminLTE.min.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/jquery.datetimepicker.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="__STATIC__/plugins/validform/5.3.2/css/Validateform_v5.3.2.css">

    <link rel="stylesheet" href="__STATIC__/plugins/bootstrap-table/bootstrap-table.min.css">
    <link rel="stylesheet" href="__STATIC__/plugins/iCheck/polaris/polaris.css">
    <link rel="stylesheet" href="__STATIC__/plugins/iCheck/futurico/futurico.css">
    <link rel="stylesheet" href="__STATIC__/plugins/iCheck/line/_all.css">
    <link rel="stylesheet" href="__STATIC__/plugins/iCheck/square/_all.css">
    <link rel="stylesheet" href="__STATIC__/plugins/iCheck/flat/_all.css">
    <link rel="stylesheet" href="__STATIC__/plugins/iCheck/minimal/_all.css">
    

    <title><?php echo \think\Config::get('site.title'); ?></title>
    

    <script src="__STATIC__/plugins/jquery/jquery-3.0.0.min.js"></script>
    <script src="__STATIC__/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="__STATIC__/admin/js/app.min.js"></script>
    <script src="__STATIC__/admin/extend/app.js"></script>

    <script src="__STATIC__/admin/extend/H-ui.admin.js"></script>
    <script src="__STATIC__/plugins/layer3.0.3/layer.js"></script>
    <script src="__STATIC__/plugins/validform/5.3.2/Validform_v5.3.2_min.js"></script>

    <script src="__STATIC__/plugins/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
    <script src="__STATIC__/plugins/bootstrap-table/bootstrap-table-zh-CN.js" type="text/javascript"></script>

    <script src="__STATIC__/plugins/iCheck/icheck.min.js"></script>
    <script>

        var admin_menu_data=<?php if(isset($admin_menu)): ?><?php echo $admin_menu; endif; ?>;
        $(function () {
            $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
                checkboxClass: 'icheckbox_minimal-blue',
                radioClass: 'iradio_minimal-blue'
            });
        })
    </script>

    
</head>
<body class="hold-transition skin-blue-light sidebar-mini">
    
<link href="__STATIC__/plugins/webuploader/custom/style.css" rel="stylesheet" type="text/css"/>
<div class="wrapper">
    <form class="form-horizontal" id="form" action="<?php echo url('ShopStore/update'); ?>">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-3 control-label">店铺名称</label>
                <div class="col-sm-6">
                    <input type="hidden" name="id" value="<?php echo $data['id']; ?>">
                    <input class="form-control" type="text" name="name" value="<?php echo $data['name']; ?>"  datatype="*" nullmsg="请填写店铺名称">
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">联系电话</label>
                <div class="col-sm-6">
                    <input class="form-control" value="<?php echo $data['mobile']; ?>" type="text" name="mobile"  datatype="*" nullmsg="请填写联系电话">
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">起送价格</label>
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon">￥</span>
                        <input name="aps_price" type="number"  step="0.01" value="<?php echo $data['aps_price']; ?>" class="form-control" style="width: 100px;">
                    </div>
                </div>
                <div class="col-sm-2"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">营业时间</label>
                <div class="col-sm-6">
                    <input class="form-control datetimepicker pull-left" style="width: 150px;" value="<?php echo $data['bizhours_start']; ?>" type="text" name="bizhours_start" id="begindate"  placeholder="开始时间"/>
                    <span class="pull-left" style=" margin: 0px 10px 0 10px;">至</span>
                    <input class="form-control datetimepicker pull-left" style="width: 150px;" value="<?php echo $data['bizhours_end']; ?>" type="text" name="bizhours_end" id="enddate" placeholder="结束时间"/>
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label  class="col-sm-3 control-label">定位</label>
                <div class="col-sm-8">
                    <div class="row">
                        <div class="col-sm-3">
                            <button type="button" id="picker" class="btn btn-primary">&nbsp;&nbsp;选择位置&nbsp;&nbsp;</button>
                        </div>
                        <div class="col-sm-5">
                            <input class="form-control" type="text" id="location" value="<?php echo $data['longitude']; ?>,<?php echo $data['latitude']; ?>" name="location" readonly="true"  datatype="*" nullmsg="请选择定位">
                        </div>
                        <div class="col-sm-3"></div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">LOGO</label>
                <div class="col-sm-6">
                    <div class="row">
                        <div class="col-sm-6">
                            <input id="logo" name="logo" value="<?php echo $data['logo']; ?>" type="hidden"/>
                            <button type="button" id="logo_btn" class="btn btn-primary simple-upload">上传图片</button>
                        </div>
                        <div class="col-sm-6">
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">封面图片</label>
                <div class="col-sm-6">
                    <div class="row">
                        <div class="col-sm-6">
                            <input id="cover_image" name="cover_image" value="<?php echo $data['cover_image']; ?>" type="hidden"/>
                            <button type="button" id="cover_image_btn" class="btn btn-primary simple-upload">上传图片</button>
                        </div>
                        <div class="col-sm-6">
                        </div>
                    </div>
                </div>
            </div>


            <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">省份</label>-->
            <!--<div class="col-sm-6">-->
            <!--<input class="form-control" type="text" name="province">-->
            <!--</div>-->
            <!--<div class="col-sm-3"></div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">城市</label>-->
            <!--<div class="col-sm-6">-->
            <!--<input class="form-control" type="text" name="city">-->
            <!--</div>-->
            <!--<div class="col-sm-3"></div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">地区</label>-->
            <!--<div class="col-sm-6">-->
            <!--<input class="form-control" type="text" name="district">-->
            <!--</div>-->
            <!--<div class="col-sm-3"></div>-->
            <!--</div>-->

            <div class="form-group">
                <label class="col-sm-3 control-label">详细地址</label>
                <div class="col-sm-6">
                    <textarea class="form-control" rows="2"  type="text" name="shop_address" maxlength="255"><?php echo $data['shop_address']; ?></textarea>
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">简介</label>
                <div class="col-sm-6">
                    <textarea class="form-control" rows="2" type="text" name="summary" maxlength="255"><?php echo $data['summary']; ?></textarea>
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否营业</label>
                <div class="col-sm-6">
                    <span class="mr20" style="padding-right: 20px"><input type="radio" class="minimal" name="flag_lock" value="0" <?php if($data['flag_lock'] == 0): ?>checked<?php endif; ?>> 正常营业</span>
                    <span class="mr20"><input type="radio" class="minimal" name="flag_lock" value="1" <?php if($data['flag_lock'] == 1): ?>checked<?php endif; ?>> 停止营业</span>
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否推荐店铺</label>
                <div class="col-sm-6">
                    <span class="mr20" style="padding-right: 20px"><input type="radio" class="minimal" name="is_recommended" value="1" <?php if($data['is_recommended'] == 1): ?>checked<?php endif; ?>> 是</span>
                    <span class="mr20"><input type="radio" class="minimal" name="is_recommended" value="0" <?php if($data['is_recommended'] == 0): ?>checked<?php endif; ?>> 否</span>
                </div>
                <div class="col-sm-3"></div>
            </div>
            <input class="form-control" type="hidden" id="longitude"  value="<?php echo $data['longitude']; ?>" name="longitude">
            <input class="form-control" type="hidden" id="latitude"  value="<?php echo $data['latitude']; ?>" name="latitude">
            <input class="form-control" type="hidden" name="zoom">
            <div class="form-group">
                <div class="col-sm-9 col-sm-offset-3">
                    <button type="submit" class="btn btn-primary">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                    <button type="button" class="btn btn-default radius ml-20" onclick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                </div>
            </div>
        </div>
    </form>
</div>

</body>
<script src="__STATIC__/admin/js/skins_control.js"></script>
<script src="__STATIC__/admin/js/jquery.datetimepicker.js"></script>


<script>
    // <editor-fold defaultstate="collapsed" desc="定位">
    $('#picker').on('click',function () {
        var url = "<?php echo url('shop_store/position'); ?>";
//        if (url.indexOf('.html')) {
//            url = url.replace('.html', '');
//            url = url + '/id/' + row.id + '.html';
//        } else {
//            url = url + '/id/' + row.id;
//        }
        layer_open("选择地址",url);
        //location.href = url;
    });
    // </editor-fold>
    $('.datetimepicker').datetimepicker({
        format: "H:i",
        lang: 'ch',
        timepicker: true,
        datepicker: false
    });
    $('#logo_btn').on('click',function (e) {
        var ids=$("#logo").val();
        //alert("<?php echo url('/addons/web_uploader/upload'); ?>"+"/parent_ele/simple"+"/id/"+ids);
        layer_open('单图上传',"<?php echo url('/addons/web_uploader/upload/parent_ele/logo/id/"+ids+"'); ?>",{w:"600px",h:"400px"})
    });
    $('#cover_image_btn').on('click',function (e) {
        var ids=$("#cover_image").val();
        //alert("<?php echo url('/addons/web_uploader/upload'); ?>"+"/parent_ele/simple"+"/id/"+ids);
        layer_open('单图上传',"<?php echo url('/addons/web_uploader/upload/parent_ele/cover_image/id/"+ids+"'); ?>",{w:"600px",h:"400px"})
    });
    $("#form").Validform({
        tiptype:2,
        showAllError:true,
        ajaxPost: true,
        callback: function (res) {
            if (res.success == true){
                layer.msg(res.message, {time: 1000},function () {
                    layer_close();
                    parent.$('#table').bootstrapTable('refresh');
                });
            }else{
                layer.alert(res.message);
            }
        }
    });
</script>

</html>